<template>
  <el-button 
    :type="类型" 
    :size="尺寸" 
    :plain="朴素" 
    :round="圆角" 
    :circle="圆形" 
    :disabled="禁用"
    :icon="图标"
  >
    {{ 文本 }}
  </el-button>
</template>

<script>
export default {
  name: 'ButtonComponent',
  componentName: '按钮',
  icon: 'el-icon-thumb',
  defaultProps: {
    文本: '按钮',
    类型: 'primary',
    尺寸: 'medium',
    朴素: false,
    圆角: false,
    圆形: false,
    禁用: false,
    图标: ''
  },
  props: {
    文本: {
      type: String,
      default: '按钮'
    },
    类型: {
      type: String,
      default: 'primary',
      validator: value => {
        return ['primary', 'success', 'warning', 'danger', 'info', 'text'].includes(value);
      }
    },
    尺寸: {
      type: String,
      default: 'medium',
      validator: value => {
        return ['medium', 'small', 'mini'].includes(value);
      }
    },
    朴素: {
      type: Boolean,
      default: false
    },
    圆角: {
      type: Boolean,
      default: false
    },
    圆形: {
      type: Boolean,
      default: false
    },
    禁用: {
      type: Boolean,
      default: false
    },
    图标: {
      type: String,
      default: ''
    }
  }
};
</script>